RTBlueToothPI

Superclass:
Declared In:

Introduction

蓝牙连接的接口 Bluetooth connection interface



Methods

-connectNoSCanByUUID:
-getBleDevicelist
-startScan:isclear:
-stopScan

connectNoSCanByUUID:


-(BOOL)connectNoSCanByUUID:(NSString *) uuid; 
Parameters
uuid

蓝牙的地址 Bluetooth address

Return Value

是否启动连接。 Whether to start the connection 连接成功是通过发送消息:PrinterConnectedNotification来得知 Connection is successful by sending the message: PrinterConnectedNotification

Discussion

不用扫描,通过uuid直接连接蓝牙 Do not scan, connect directly to the Bluetooth through uuid


getBleDevicelist


-(NSArray *) getBleDevicelist; 
Return Value

蓝牙列表的数组 An array of Bluetooth lists

Discussion

获取蓝牙列表 Get Bluetooth list


startScan:isclear:


-(BOOL)startScan:(NSInteger)scanSeconds isclear:(BOOL)isclear; 
Parameters
scanSeconds

要扫描几秒(暂时无用,改为自行调用stopScan来停止扫描) To scan a few seconds (temporarily useless, call stopScan instead to stop scanning)

isclear

是否清除原有的蓝牙列表 YES:清除 NO:不清除 Whether to clear the original Bluetooth list YES: Clear NO: Do not clear

Return Value

是否成功启用扫描 Whether to enable scanning successfully

Discussion

开始扫描蓝牙设备 Start scanning Bluetooth devices


stopScan


-(void) stopScan; 
Discussion

停止扫描 Stop scanning


Properties

BleKind
MTULength
SendDelayMS

BleKind


@property (nonatomic) BlueToothKind BleKind; 
Discussion

蓝牙连接类型 Bluetooth connection type


MTULength


@property (nonatomic) NSInteger MTULength; 
Discussion

蓝牙传输最大尺寸 Bluetooth transmission maximum size


SendDelayMS


@property (nonatomic) NSInteger SendDelayMS; 
Discussion

分包发间隔秒数(单位:毫秒) Send data interval seconds (unit: milliseconds)